Optimal. Leaf size=319 \[ \frac {7 (3 A+i B) x}{128 a^3 c^6}+\frac {A+i B}{384 a^3 c^6 f (i-\tan (e+f x))^3}-\frac {7 i A-5 B}{512 a^3 c^6 f (i-\tan (e+f x))^2}-\frac {7 (2 A+i B)}{256 a^3 c^6 f (i-\tan (e+f x))}+\frac {i A+B}{96 a^3 c^6 f (i+\tan (e+f x))^6}+\frac {2 A-i B}{80 a^3 c^6 f (i+\tan (e+f x))^5}-\frac {5 i A+B}{128 a^3 c^6 f (i+\tan (e+f x))^4}-\frac {5 A}{96 a^3 c^6 f (i+\tan (e+f x))^3}+\frac {5 (7 i A-B)}{512 a^3 c^6 f (i+\tan (e+f x))^2}+\frac {7 (4 A+i B)}{256 a^3 c^6 f (i+\tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 319, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3669, 78, 209}
\begin {gather*} -\frac {7 (2 A+i B)}{256 a^3 c^6 f (-\tan (e+f x)+i)}+\frac {7 (4 A+i B)}{256 a^3 c^6 f (\tan (e+f x)+i)}-\frac {-5 B+7 i A}{512 a^3 c^6 f (-\tan (e+f x)+i)^2}+\frac {5 (-B+7 i A)}{512 a^3 c^6 f (\tan (e+f x)+i)^2}+\frac {A+i B}{384 a^3 c^6 f (-\tan (e+f x)+i)^3}-\frac {B+5 i A}{128 a^3 c^6 f (\tan (e+f x)+i)^4}+\frac {2 A-i B}{80 a^3 c^6 f (\tan (e+f x)+i)^5}+\frac {B+i A}{96 a^3 c^6 f (\tan (e+f x)+i)^6}+\frac {7 x (3 A+i B)}{128 a^3 c^6}-\frac {5 A}{96 a^3 c^6 f (\tan (e+f x)+i)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 209
Rule 3669
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^6} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(a+i a x)^4 (c-i c x)^7} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (\frac {A+i B}{128 a^4 c^7 (-i+x)^4}+\frac {i (7 A+5 i B)}{256 a^4 c^7 (-i+x)^3}-\frac {7 (2 A+i B)}{256 a^4 c^7 (-i+x)^2}-\frac {i (A-i B)}{16 a^4 c^7 (i+x)^7}+\frac {-2 A+i B}{16 a^4 c^7 (i+x)^6}+\frac {5 i A+B}{32 a^4 c^7 (i+x)^5}+\frac {5 A}{32 a^4 c^7 (i+x)^4}+\frac {5 (-7 i A+B)}{256 a^4 c^7 (i+x)^3}-\frac {7 (4 A+i B)}{256 a^4 c^7 (i+x)^2}+\frac {7 (3 A+i B)}{128 a^4 c^7 \left (1+x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {A+i B}{384 a^3 c^6 f (i-\tan (e+f x))^3}-\frac {7 i A-5 B}{512 a^3 c^6 f (i-\tan (e+f x))^2}-\frac {7 (2 A+i B)}{256 a^3 c^6 f (i-\tan (e+f x))}+\frac {i A+B}{96 a^3 c^6 f (i+\tan (e+f x))^6}+\frac {2 A-i B}{80 a^3 c^6 f (i+\tan (e+f x))^5}-\frac {5 i A+B}{128 a^3 c^6 f (i+\tan (e+f x))^4}-\frac {5 A}{96 a^3 c^6 f (i+\tan (e+f x))^3}+\frac {5 (7 i A-B)}{512 a^3 c^6 f (i+\tan (e+f x))^2}+\frac {7 (4 A+i B)}{256 a^3 c^6 f (i+\tan (e+f x))}+\frac {(7 (3 A+i B)) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{128 a^3 c^6 f}\\ &=\frac {7 (3 A+i B) x}{128 a^3 c^6}+\frac {A+i B}{384 a^3 c^6 f (i-\tan (e+f x))^3}-\frac {7 i A-5 B}{512 a^3 c^6 f (i-\tan (e+f x))^2}-\frac {7 (2 A+i B)}{256 a^3 c^6 f (i-\tan (e+f x))}+\frac {i A+B}{96 a^3 c^6 f (i+\tan (e+f x))^6}+\frac {2 A-i B}{80 a^3 c^6 f (i+\tan (e+f x))^5}-\frac {5 i A+B}{128 a^3 c^6 f (i+\tan (e+f x))^4}-\frac {5 A}{96 a^3 c^6 f (i+\tan (e+f x))^3}+\frac {5 (7 i A-B)}{512 a^3 c^6 f (i+\tan (e+f x))^2}+\frac {7 (4 A+i B)}{256 a^3 c^6 f (i+\tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.30, size = 321, normalized size = 1.01 \begin {gather*} \frac {\sec ^3(e+f x) (-\cos (6 (e+f x))-i \sin (6 (e+f x))) (-210 (27 A+i B) \cos (e+f x)+280 (-3 A+i B-18 i A f x+6 B f x) \cos (3 (e+f x))+810 A \cos (5 (e+f x))+750 i B \cos (5 (e+f x))+81 A \cos (7 (e+f x))+147 i B \cos (7 (e+f x))+5 A \cos (9 (e+f x))+15 i B \cos (9 (e+f x))+1890 i A \sin (e+f x)-630 B \sin (e+f x)-840 i A \sin (3 (e+f x))-280 B \sin (3 (e+f x))-5040 A f x \sin (3 (e+f x))-1680 i B f x \sin (3 (e+f x))-1350 i A \sin (5 (e+f x))+450 B \sin (5 (e+f x))-189 i A \sin (7 (e+f x))+63 B \sin (7 (e+f x))-15 i A \sin (9 (e+f x))+5 B \sin (9 (e+f x)))}{30720 a^3 c^6 f (-i+\tan (e+f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.59, size = 232, normalized size = 0.73
method | result | size |
derivativedivides | \(\frac {\left (-\frac {21 i A}{256}+\frac {7 B}{256}\right ) \ln \left (-i+\tan \left (f x +e \right )\right )-\frac {\frac {A}{128}+\frac {i B}{128}}{3 \left (-i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {5 B}{256}+\frac {7 i A}{256}}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {-\frac {7 i B}{256}-\frac {7 A}{128}}{-i+\tan \left (f x +e \right )}-\frac {-\frac {i A}{16}-\frac {B}{16}}{6 \left (i+\tan \left (f x +e \right )\right )^{6}}-\frac {-\frac {35 i A}{256}+\frac {5 B}{256}}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}+\left (\frac {21 i A}{256}-\frac {7 B}{256}\right ) \ln \left (i+\tan \left (f x +e \right )\right )-\frac {\frac {5 i A}{32}+\frac {B}{32}}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {\frac {i B}{16}-\frac {A}{8}}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}-\frac {-\frac {7 A}{64}-\frac {7 i B}{256}}{i+\tan \left (f x +e \right )}-\frac {5 A}{96 \left (i+\tan \left (f x +e \right )\right )^{3}}}{f \,a^{3} c^{6}}\) | \(232\) |
default | \(\frac {\left (-\frac {21 i A}{256}+\frac {7 B}{256}\right ) \ln \left (-i+\tan \left (f x +e \right )\right )-\frac {\frac {A}{128}+\frac {i B}{128}}{3 \left (-i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {5 B}{256}+\frac {7 i A}{256}}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {-\frac {7 i B}{256}-\frac {7 A}{128}}{-i+\tan \left (f x +e \right )}-\frac {-\frac {i A}{16}-\frac {B}{16}}{6 \left (i+\tan \left (f x +e \right )\right )^{6}}-\frac {-\frac {35 i A}{256}+\frac {5 B}{256}}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}+\left (\frac {21 i A}{256}-\frac {7 B}{256}\right ) \ln \left (i+\tan \left (f x +e \right )\right )-\frac {\frac {5 i A}{32}+\frac {B}{32}}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {\frac {i B}{16}-\frac {A}{8}}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}-\frac {-\frac {7 A}{64}-\frac {7 i B}{256}}{i+\tan \left (f x +e \right )}-\frac {5 A}{96 \left (i+\tan \left (f x +e \right )\right )^{3}}}{f \,a^{3} c^{6}}\) | \(232\) |
norman | \(\frac {\frac {7 \left (i B +3 A \right ) x}{128 a c}-\frac {7 i A +B}{30 a c f}+\frac {281 \left (i B +3 A \right ) \left (\tan ^{5}\left (f x +e \right )\right )}{320 a c f}+\frac {231 \left (i B +3 A \right ) \left (\tan ^{7}\left (f x +e \right )\right )}{320 a c f}+\frac {119 \left (i B +3 A \right ) \left (\tan ^{9}\left (f x +e \right )\right )}{384 a c f}+\frac {7 \left (i B +3 A \right ) \left (\tan ^{11}\left (f x +e \right )\right )}{128 a c f}+\frac {21 \left (i B +3 A \right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{64 a c}+\frac {105 \left (i B +3 A \right ) x \left (\tan ^{4}\left (f x +e \right )\right )}{128 a c}+\frac {35 \left (i B +3 A \right ) x \left (\tan ^{6}\left (f x +e \right )\right )}{32 a c}+\frac {105 \left (i B +3 A \right ) x \left (\tan ^{8}\left (f x +e \right )\right )}{128 a c}+\frac {21 \left (i B +3 A \right ) x \left (\tan ^{10}\left (f x +e \right )\right )}{64 a c}+\frac {7 \left (i B +3 A \right ) x \left (\tan ^{12}\left (f x +e \right )\right )}{128 a c}+\frac {\left (-7 i B +107 A \right ) \tan \left (f x +e \right )}{128 a c f}+\frac {\left (265 i B +667 A \right ) \left (\tan ^{3}\left (f x +e \right )\right )}{384 a c f}+\frac {\left (i A +3 B \right ) \left (\tan ^{2}\left (f x +e \right )\right )}{10 a c f}}{\left (1+\tan ^{2}\left (f x +e \right )\right )^{6} a^{2} c^{5}}\) | \(392\) |
risch | \(-\frac {83 i \cos \left (6 f x +6 e \right ) A}{3072 a^{3} c^{6} f}+\frac {21 x A}{128 a^{3} c^{6}}-\frac {{\mathrm e}^{12 i \left (f x +e \right )} B}{6144 a^{3} c^{6} f}-\frac {45 i \cos \left (2 f x +2 e \right ) A}{512 a^{3} c^{6} f}-\frac {7 \,{\mathrm e}^{10 i \left (f x +e \right )} B}{5120 a^{3} c^{6} f}+\frac {7 i x B}{128 a^{3} c^{6}}-\frac {5 \,{\mathrm e}^{8 i \left (f x +e \right )} B}{1024 a^{3} c^{6} f}+\frac {17 i \sin \left (2 f x +2 e \right ) B}{512 a^{3} c^{6} f}-\frac {29 \cos \left (6 f x +6 e \right ) B}{3072 a^{3} c^{6} f}-\frac {i {\mathrm e}^{12 i \left (f x +e \right )} A}{6144 a^{3} c^{6} f}-\frac {9 i {\mathrm e}^{8 i \left (f x +e \right )} A}{1024 a^{3} c^{6} f}+\frac {85 \sin \left (6 f x +6 e \right ) A}{3072 a^{3} c^{6} f}-\frac {21 \cos \left (4 f x +4 e \right ) B}{2048 a^{3} c^{6} f}-\frac {117 i \cos \left (4 f x +4 e \right ) A}{2048 a^{3} c^{6} f}-\frac {9 i \sin \left (6 f x +6 e \right ) B}{1024 a^{3} c^{6} f}+\frac {135 \sin \left (4 f x +4 e \right ) A}{2048 a^{3} c^{6} f}-\frac {3 \cos \left (2 f x +2 e \right ) B}{512 a^{3} c^{6} f}-\frac {7 i \sin \left (4 f x +4 e \right ) B}{2048 a^{3} c^{6} f}-\frac {9 i {\mathrm e}^{10 i \left (f x +e \right )} A}{5120 a^{3} c^{6} f}+\frac {81 \sin \left (2 f x +2 e \right ) A}{512 a^{3} c^{6} f}\) | \(410\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.26, size = 195, normalized size = 0.61 \begin {gather*} \frac {{\left (1680 \, {\left (3 \, A + i \, B\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} - 5 \, {\left (i \, A + B\right )} e^{\left (18 i \, f x + 18 i \, e\right )} - 6 \, {\left (9 i \, A + 7 \, B\right )} e^{\left (16 i \, f x + 16 i \, e\right )} - 30 \, {\left (9 i \, A + 5 \, B\right )} e^{\left (14 i \, f x + 14 i \, e\right )} - 280 \, {\left (3 i \, A + B\right )} e^{\left (12 i \, f x + 12 i \, e\right )} - 210 \, {\left (9 i \, A + B\right )} e^{\left (10 i \, f x + 10 i \, e\right )} - 420 \, {\left (9 i \, A - B\right )} e^{\left (8 i \, f x + 8 i \, e\right )} - 120 \, {\left (-9 i \, A + 5 \, B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 15 \, {\left (-9 i \, A + 7 \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + 10 i \, A - 10 \, B\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{30720 \, a^{3} c^{6} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.95, size = 753, normalized size = 2.36 \begin {gather*} \begin {cases} \frac {\left (\left (6800207735332289107722240 i A a^{24} c^{48} f^{8} e^{6 i e} - 6800207735332289107722240 B a^{24} c^{48} f^{8} e^{6 i e}\right ) e^{- 6 i f x} + \left (91802804426985902954250240 i A a^{24} c^{48} f^{8} e^{8 i e} - 71402181220989035631083520 B a^{24} c^{48} f^{8} e^{8 i e}\right ) e^{- 4 i f x} + \left (734422435415887223634001920 i A a^{24} c^{48} f^{8} e^{10 i e} - 408012464119937346463334400 B a^{24} c^{48} f^{8} e^{10 i e}\right ) e^{- 2 i f x} + \left (- 2570478523955605282719006720 i A a^{24} c^{48} f^{8} e^{14 i e} + 285608724883956142524334080 B a^{24} c^{48} f^{8} e^{14 i e}\right ) e^{2 i f x} + \left (- 1285239261977802641359503360 i A a^{24} c^{48} f^{8} e^{16 i e} - 142804362441978071262167040 B a^{24} c^{48} f^{8} e^{16 i e}\right ) e^{4 i f x} + \left (- 571217449767912285048668160 i A a^{24} c^{48} f^{8} e^{18 i e} - 190405816589304095016222720 B a^{24} c^{48} f^{8} e^{18 i e}\right ) e^{6 i f x} + \left (- 183605608853971805908500480 i A a^{24} c^{48} f^{8} e^{20 i e} - 102003116029984336615833600 B a^{24} c^{48} f^{8} e^{20 i e}\right ) e^{8 i f x} + \left (- 36721121770794361181700096 i A a^{24} c^{48} f^{8} e^{22 i e} - 28560872488395614252433408 B a^{24} c^{48} f^{8} e^{22 i e}\right ) e^{10 i f x} + \left (- 3400103867666144553861120 i A a^{24} c^{48} f^{8} e^{24 i e} - 3400103867666144553861120 B a^{24} c^{48} f^{8} e^{24 i e}\right ) e^{12 i f x}\right ) e^{- 12 i e}}{20890238162940792138922721280 a^{27} c^{54} f^{9}} & \text {for}\: a^{27} c^{54} f^{9} e^{12 i e} \neq 0 \\x \left (- \frac {21 A + 7 i B}{128 a^{3} c^{6}} + \frac {\left (A e^{18 i e} + 9 A e^{16 i e} + 36 A e^{14 i e} + 84 A e^{12 i e} + 126 A e^{10 i e} + 126 A e^{8 i e} + 84 A e^{6 i e} + 36 A e^{4 i e} + 9 A e^{2 i e} + A - i B e^{18 i e} - 7 i B e^{16 i e} - 20 i B e^{14 i e} - 28 i B e^{12 i e} - 14 i B e^{10 i e} + 14 i B e^{8 i e} + 28 i B e^{6 i e} + 20 i B e^{4 i e} + 7 i B e^{2 i e} + i B\right ) e^{- 6 i e}}{512 a^{3} c^{6}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (21 A + 7 i B\right )}{128 a^{3} c^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.04, size = 319, normalized size = 1.00 \begin {gather*} \frac {\frac {420 \, {\left (3 i \, A - B\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{a^{3} c^{6}} - \frac {420 \, {\left (3 i \, A - B\right )} \log \left (i \, \tan \left (f x + e\right ) + 1\right )}{a^{3} c^{6}} - \frac {10 \, {\left (231 \, A \tan \left (f x + e\right )^{3} + 77 i \, B \tan \left (f x + e\right )^{3} - 777 i \, A \tan \left (f x + e\right )^{2} + 273 \, B \tan \left (f x + e\right )^{2} - 882 \, A \tan \left (f x + e\right ) - 330 i \, B \tan \left (f x + e\right ) + 340 i \, A - 138 \, B\right )}}{a^{3} c^{6} {\left (-i \, \tan \left (f x + e\right ) - 1\right )}^{3}} + \frac {-3087 i \, A \tan \left (f x + e\right )^{6} + 1029 \, B \tan \left (f x + e\right )^{6} + 20202 \, A \tan \left (f x + e\right )^{5} + 6594 i \, B \tan \left (f x + e\right )^{5} + 55755 i \, A \tan \left (f x + e\right )^{4} - 17685 \, B \tan \left (f x + e\right )^{4} - 83540 \, A \tan \left (f x + e\right )^{3} - 25380 i \, B \tan \left (f x + e\right )^{3} - 72405 i \, A \tan \left (f x + e\right )^{2} + 20415 \, B \tan \left (f x + e\right )^{2} + 35106 \, A \tan \left (f x + e\right ) + 8442 i \, B \tan \left (f x + e\right ) + 7761 i \, A - 1127 \, B}{a^{3} c^{6} {\left (\tan \left (f x + e\right ) + i\right )}^{6}}}{15360 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.30, size = 352, normalized size = 1.10 \begin {gather*} \frac {\mathrm {tan}\left (e+f\,x\right )\,\left (-\frac {29\,B}{640\,a^3\,c^6}+\frac {A\,87{}\mathrm {i}}{640\,a^3\,c^6}\right )-{\mathrm {tan}\left (e+f\,x\right )}^8\,\left (\frac {21\,A}{128\,a^3\,c^6}+\frac {B\,7{}\mathrm {i}}{128\,a^3\,c^6}\right )-{\mathrm {tan}\left (e+f\,x\right )}^7\,\left (-\frac {21\,B}{128\,a^3\,c^6}+\frac {A\,63{}\mathrm {i}}{128\,a^3\,c^6}\right )+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {129\,A}{128\,a^3\,c^6}+\frac {B\,43{}\mathrm {i}}{128\,a^3\,c^6}\right )-{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (-\frac {49\,B}{128\,a^3\,c^6}+\frac {A\,147{}\mathrm {i}}{128\,a^3\,c^6}\right )+{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (\frac {7\,A}{128\,a^3\,c^6}+\frac {B\,7{}\mathrm {i}}{384\,a^3\,c^6}\right )+{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {609\,A}{640\,a^3\,c^6}+\frac {B\,203{}\mathrm {i}}{640\,a^3\,c^6}\right )-{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (-\frac {413\,B}{1920\,a^3\,c^6}+\frac {A\,413{}\mathrm {i}}{640\,a^3\,c^6}\right )+\frac {7\,A}{30\,a^3\,c^6}-\frac {B\,1{}\mathrm {i}}{30\,a^3\,c^6}}{f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^9-{\mathrm {tan}\left (e+f\,x\right )}^8\,3{}\mathrm {i}-{\mathrm {tan}\left (e+f\,x\right )}^6\,8{}\mathrm {i}+6\,{\mathrm {tan}\left (e+f\,x\right )}^5-{\mathrm {tan}\left (e+f\,x\right )}^4\,6{}\mathrm {i}+8\,{\mathrm {tan}\left (e+f\,x\right )}^3+3\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}+\frac {7\,x\,\left (3\,A+B\,1{}\mathrm {i}\right )}{128\,a^3\,c^6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________